/*******************************************************************************
 * Copyright (c) 2002, 2014 IBM Corp. and others
 *
 * This program and the accompanying materials are made available under
 * the terms of the Eclipse Public License 2.0 which accompanies this
 * distribution and is available at https://www.eclipse.org/legal/epl-2.0/
 * or the Apache License, Version 2.0 which accompanies this distribution and
 * is available at https://www.apache.org/licenses/LICENSE-2.0.
 *
 * This Source Code may also be made available under the following
 * Secondary Licenses when the conditions for such availability set
 * forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
 * General Public License, version 2 with the GNU Classpath
 * Exception [1] and GNU General Public License, version 2 with the
 * OpenJDK Assembly Exception [2].
 *
 * [1] https://www.gnu.org/software/classpath/license.html
 * [2] http://openjdk.java.net/legal/assembly-exception.html
 *
 * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
 *******************************************************************************/
#define true 1
#define false 0
#include "floatsanityg.h"


   void group_java_lang_StrictMath_sin() {
      int i=0, groupNum=59,numTests=127;
      int testsPassed=0, testsFailed=0;
      unsigned int op_0 [] = {
         0x3fd58139, 0xf95ac4e8,
         0x3fd4d753, 0xca24770c,
         0x3fe1f1b5, 0xe2ee80f8,
         0x3fe49c30, 0xb7f0c2cd,
         0x3fe7d46b, 0xb0e4050c,
         0x3fc0e1f1, 0x09547674,
         0x3fd1a461, 0xa53076c8,
         0x3fe6d154, 0x187c4bbf,
         0x3fe7ba16, 0xf9d650c2,
         0x3fe8ff6c, 0x11a7fd62,
         0x3fda4581, 0x212ad2cc,
         0x3fd48eb0, 0xe8c22c3c,
         0x3fde27bd, 0x7edbf5f0,
         0x3fc04b98, 0xdca6b9ac,
         0x3fe1d234, 0x547f8161,
         0x3fe3af12, 0x8232e8e3,
         0x3fe8cf7c, 0xf31f38d8,
         0x3fe87105, 0x3cd8f2bf,
         0x3f932ffb, 0x96cf3360,
         0x3fb378cd, 0x50af46e8,
         0x3ff921f0, 0xd7e968a9,
         0xc01921fb, 0x54442d18,
         0x3ff921fb, 0x54442d1b,
         0xffefffff, 0xffffffff,
         0xffeccccc, 0xcccccccc,
         0xffe99999, 0x99999999,
         0xffe66666, 0x66666666,
         0xffe33333, 0x33333333,
         0xffe00000, 0x00000000,
         0xffd99999, 0x9999999a,
         0xffd33333, 0x33333334,
         0xffc99999, 0x9999999c,
         0xffb99999, 0x9999999f,
         0xfc980000, 0x00000000,
         0x7fb99999, 0x99999993,
         0x7fc99999, 0x99999996,
         0x7fd33333, 0x33333331,
         0x7fd99999, 0x99999997,
         0x7fdfffff, 0xfffffffd,
         0x7fe33333, 0x33333332,
         0x7fe66666, 0x66666665,
         0x7fe99999, 0x99999998,
         0x7feccccc, 0xcccccccb,
         0x7fefffff, 0xfffffffe,
         0xc32fc000, 0x00000000,
         0x7fefffff, 0xffffffff,
         0x0, 0x2,
         0x0, 0x9,
         0x40000, 0x00000000,
         0x80000, 0x00000000,
         0xfffff, 0xfffffffe,
         0xfffff, 0xffffffff,
         0x80000000, 0x00000002,
         0x80000000, 0x00000009,
         0x80040000, 0x00000000,
         0x80080000, 0x00000000,
         0x800fffff, 0xfffffffe,
         0x800fffff, 0xffffffff,
         0x408fb4e1, 0x47ae149b,
         0x4090961e, 0xb851eb95,
         0xc0863000, 0x00000000,
         0xc08627eb, 0x851eb852,
         0x4051ef5c, 0x28f5c132,
         0x3ff0a2b2, 0x3def12b7,
         0x3ff0a2b2, 0x3e33cae7,
         0x3ff0a2b2, 0x3f8b63d7,
         0xbfefffff, 0xffffffff,
         0x3fefffff, 0xfffffff0,
         0x3fefffff, 0xffffffff,
         0x3fefffff, 0xfffffe14,
         0xc0152c38, 0xc4e8043a,
         0xc014e48a, 0xb06d22f4,
         0xc014da4d, 0x3fc94bea,
         0xc010d00f, 0xcf2574f8,
         0xc0014e34, 0x192c3200,
         0x40124ea8, 0x82c60fb8,
         0x401258e5, 0xf369e6c2,
         0x4014e842, 0x1c5fa942,
         0xbff80d0c, 0x0962a17e,
         0xbff03601, 0xcbf1fda5,
         0x3ff111ac, 0x4888e3a9,
         0x3ff911ac, 0x4888e3ab,
         0x3fefced9, 0x1687291c,
         0x3fefe76c, 0x8b439398,
         0x3feff3b6, 0x45a1c8d6,
         0x3feff7ce, 0xd9168540,
         0xc014eec8, 0x2110f9fe,
         0x400d7e98, 0xb3a09a7b,
         0xc00295e2, 0x2da71340,
         0x3ffff2f3, 0xf69d5e8e,
         0x401058e5, 0xf369e6ce,
         0xc00e8167, 0x4c5f64e4,
         0x3fc6978d, 0x4fdf3b6a,
         0x3fd126e9, 0x78d4fdf8,
         0x3fd2978d, 0x4fdf3b69,
         0x3fd6a7ef, 0x9db22d14,
         0x3fd7c6a7, 0xef9db233,
         0x3fd7df3b, 0x645a1cb2,
         0x3fd820c4, 0x9ba5e35a,
         0x3fd98106, 0x24dd2f21,
         0x3fdbdf3b, 0x645a1cb3,
         0x3fdc20c4, 0x9ba5e35b,
         0x3fdc28f5, 0xc28f5c30,
         0x3fdcbc6a, 0x7ef9db2a,
         0x3fdf645a, 0x1cac0839,
         0x3fe00831, 0x26e978d8,
         0x3fe01cac, 0x083126ea,
         0x3fe0b439, 0x5810623c,
         0x3fe0bc6a, 0x7ef9db10,
         0x3fe1ba5e, 0x353f7cbc,
         0x3fe1c6a7, 0xef9db1fa,
         0x3fe1d2f1, 0xa9fbe738,
         0x3fe1d70a, 0x3d70a3a2,
         0x3fe21cac, 0x083126ac,
         0x3fe29ba5, 0xe353f782,
         0x3fe33f7c, 0xed916812,
         0x3fe38d4f, 0xdf3b63f0,
         0x3fe39168, 0x72b0205a,
         0x3fe39999, 0x9999992e,
         0x3fe40c49, 0xba5e34c6,
         0x3fe4e147, 0xae147a4e,
         0x3fe5ef9d, 0xb22d0da2,
         0x3fe651eb, 0x851eb792,
         0x3fe676c8, 0xb439574c,
         0x3fe81062, 0x4dd2f0b4,
         0x3fe84189, 0x374bc5ac,
         0x3feac083, 0x126e9644,
         0x0, 0x0};
      unsigned int result [] = {
         0x3fd51a37, 0x3acfdca7,
         0x3fd47987, 0xbfff310a,
         0x3fe104b8, 0x94a3cb77,
         0x3fe336e7, 0x10633129,
         0x3fe5b004, 0xf3fe2209,
         0x3fc0d56b, 0xe415defc,
         0x3fd16b66, 0x7e833319,
         0x3fe4eec3, 0x48fa586c,
         0x3fe59ca1, 0x23fe0dbd,
         0x3fe68821, 0x43e85738,
         0x3fd98a35, 0xe1ef9f53,
         0x3fd434a8, 0xfce241a7,
         0x3fdd0d41, 0x6cdd4a9c,
         0x3fc04056, 0x87b227ee,
         0x3fe0ea02, 0x01296c9a,
         0x3fe27741, 0x31a0a026,
         0x3fe665fe, 0x843645c5,
         0x3fe62225, 0x80241f5e,
         0x3f932fb2, 0x01cf7008,
         0x3fb373ff, 0x3256949f,
         0x3fefffff, 0xfff920c8,
         0x3cb1a626, 0x33145c07,
         0x3ff00000, 0x00000000,
         0xbf7452fc, 0x98b34e97,
         0x3fe5db7d, 0x99630b7e,
         0xbfefead3, 0x3cce3294,
         0x3fe8fb54, 0x01d9641e,
         0xbfc2f9b1, 0x11618394,
         0xbfe20524, 0x8cbdb760,
         0x3fef3048, 0xf2c8e08b,
         0xbfebbfec, 0xdc58ea25,
         0x3fd311ae, 0x84602e3d,
         0x3fe8b77b, 0xd74ebbe8,
         0x3fefd028, 0x112e4d1a,
         0x3fec808d, 0xbadb4253,
         0x3fdfbbeb, 0x47f987f9,
         0xbfee85d7, 0x48ca8a44,
         0x3fececfa, 0xa88c329c,
         0xbfd7da2c, 0x35379e4b,
         0xbfef2717, 0x570b159d,
         0x3febd414, 0x9f80cede,
         0xbfd35f39, 0xcdd75be3,
         0xbfdb3a6a, 0xa73d718c,
         0x3fedaa36, 0x77c6ee8a,
         0xbfee9ef1, 0x3cac7ae5,
         0x3f7452fc, 0x98b34e97,
         0x0, 0x2,
         0x0, 0x9,
         0x40000, 0x00000000,
         0x80000, 0x00000000,
         0xfffff, 0xfffffffe,
         0xfffff, 0xffffffff,
         0x80000000, 0x00000002,
         0x80000000, 0x00000009,
         0x80040000, 0x00000000,
         0x80080000, 0x00000000,
         0x800fffff, 0xfffffffe,
         0x800fffff, 0xffffffff,
         0x3fbfc56e, 0x12d2c0a2,
         0xbfd4a306, 0x94203fa3,
         0xbf0f9bd0, 0x303f6faf,
         0x3feb18fb, 0xd908b222,
         0x3fdf9cef, 0xd9928309,
         0x3feb97a8, 0x3d246884,
         0x3feb97a8, 0x3d6a0408,
         0x3feb97a8, 0x3ec60d9b,
         0xbfeaed54, 0x8f090ced,
         0x3feaed54, 0x8f090ce5,
         0x3feaed54, 0x8f090ced,
         0x3feaed54, 0x8f090be4,
         0x3feac0b9, 0x8d964236,
         0x3febea56, 0x0b650e20,
         0x3fec1206, 0xcabc9f15,
         0x3febf0b4, 0x930167be,
         0xbfea8c28, 0x89a3e92d,
         0xbfefb4d4, 0x4501f17c,
         0xbfefbf7e, 0xd3268492,
         0xbfebdbc1, 0x03f8d2f5,
         0xbfefed48, 0x85ccf313,
         0xbfeb2716, 0xf3222754,
         0x3fec0576, 0x33227726,
         0x3fefffef, 0x606375ff,
         0x3fead2a6, 0x423fafa6,
         0x3feae005, 0x55a42845,
         0x3feae6ae, 0xee145f6f,
         0x3feae8e6, 0x949c8142,
         0x3febc1ee, 0x5a36f25d,
         0xbfe0986f, 0xb2d58dbb,
         0xbfe75ca3, 0x59ff3aac,
         0x3fed23c9, 0x2140e547,
         0xbfe9f0a7, 0xf99762b9,
         0x3fe3e956, 0x585240b2,
         0x3fc67991, 0xfedafec7,
         0x3fd0f289, 0xcdafc67c,
         0x3fd254e3, 0xfe9f7cbe,
         0x3fd62f8e, 0x28141e03,
         0x3fd73b9d, 0x0a6bf5e1,
         0x3fd75281, 0x9a53e4e9,
         0x3fd78f7c, 0xeb77da0f,
         0x3fd8d596, 0x42c1bad8,
         0x3fdaffd0, 0xf494e65d,
         0x3fdb3b2d, 0xfa2274fc,
         0x3fdb4297, 0x9a223067,
         0x3fdbc7b8, 0x04e683d3,
         0x3fde25f6, 0x2f3f372d,
         0x3fdebd48, 0x4bd8dcdf,
         0x3fdee12f, 0x14647212,
         0x3fdfe94d, 0xf8bb4036,
         0x3fdff780, 0xa5ba8405,
         0x3fe0d5c1, 0x45f4290c,
         0x3fe0e033, 0x3e314e45,
         0x3fe0eaa2, 0xb96462d8,
         0x3fe0ee1c, 0xa9f630d8,
         0x3fe1290b, 0x04b17396,
         0x3fe193af, 0x7c31a5b6,
         0x3fe21bb0, 0x0a63dfd1,
         0x3fe25ba4, 0x77163c4c,
         0x3fe25eff, 0x2d479c8e,
         0x3fe265b3, 0xb272e7e9,
         0x3fe2c313, 0x9aaa3371,
         0x3fe36df9, 0xaeb7d609,
         0x3fe44207, 0x57c105bd,
         0x3fe48dc0, 0x37b81eff,
         0x3fe4a9f3, 0xb00c5f47,
         0x3fe5dbf6, 0x2742e8e5,
         0x3fe5ffc1, 0xea968148,
         0x3fe7be32, 0x3f09b05b,
         0x0, 0x0};
      double *p0=(double *) op_0;
      double *erp=(double*) result, r, *rp=&r;
      for (i=0; i<numTests; i++) {
         r = java_lang_StrictMath_sin(*(p0));
         if ( IS_DNAN(erp) ){
            if ( !(IS_DNAN(&r)) ){
               printf("%d.%d: op_0=0x%08x%08x Expected=0x%08x%08x Actual=0x%08x%08x \n",
                  groupNum, i, 
                  *(int *)p0, *((int *)p0+1), *(int *)erp, *((int *) erp + 1), *(int *)&r, *((int *) &r + 1));
               testsFailed++;
            } else {
               testsPassed++;
            }

         } else {
            if ( (HIWORD(&r) != HIWORD(erp)) || (LOWORD(&r) != LOWORD(erp)) ){
               printf("%d.%d: op_0=0x%08x%08x Expected=0x%08x%08x Actual=0x%08x%08x \n",
                  groupNum, i, 
                  *(int *)p0, *((int *)p0+1), *(int *)erp, *((int *) erp + 1), *(int *)&r, *((int *) &r + 1));
               testsFailed++;
            } else {
               testsPassed++;
            }
         }

         p0++;erp++;
      }
      printf("[%d] %s Passed %d Failed %d Total %d \n", groupNum,"java_lang_StrictMath_sin", testsPassed, testsFailed, numTests);
      totalNumTest +=numTests; totalTestsPassed +=testsPassed; totalTestsFailed +=testsFailed;
   }

